home *** CD-ROM | disk | FTP | other *** search
/ CBM Funet Archive / cbm-funet-archive-2003.iso / cbm / demodisks / drives / 1581-demo.lzh / backup 64-1581 (.txt) < prev    next >
Commodore BASIC  |  1994-10-19  |  4KB  |  72 lines

  1. 10 sys04839:r$="try"
  2. 15 poke53281,0:poke53280,0
  3. 20 ps=0:bl$="                                     "
  4. 25 bl$=bl$+"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]":d$=""
  5. 30 l2$="[155][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]":zz=8:px=57093:pokepx,0:if(peek(px)<>0)then45
  6. 35 pokepx,255:if(peek(px)<>255)then45
  7. 40 zz=3
  8. 45 nd=0:u=8:gosub330
  9. 50 u=9:gosub330:ifnd=2then65
  10. 55 u=10:gosub330:ifnd=2then65
  11. 60 u=11:gosub330
  12. 65 u=su:ap$=right$(str$(zz),2)+" passes   ":ifnd=2thenap$=" one pass   "
  13. 70 print"[147]"spc(7)l2$:printspc(7)"[159]  c64 backup 1581 disk   ":printspc(7)l2$
  14. 75 print"[159] to avoid mistakes, slide the write "
  15. 80 print" protect tab on the right side of   "
  16. 85 print" your original disk into the open   "
  17. 90 print" position.  it will take 20 minutes ":remap$
  18. 95 print" to backup a full disk.             "
  19. 100 ln$="  "+l2$+"[192][192][192][192][192][192][192][192][192][192][192]":u$="[145][145][145][145][145][145][145][145]"
  20. 105 print""ln$:printspc(2)"[159] instructions:":println$""d$
  21. 110 uu=1:ifu>9thenuu=2
  22. 115 ifpeek(10255)=0then225
  23. 120 if nd=0 then225
  24. 130 println$:print"   [159]unit:"u spc(uu)"[159]  pass: 1   [159]r to restart"
  25. 135 println$"[145][145][145][145][145][145][145][145][145][145][145][145]"
  26. 140 gosub350:poke10260,u:gosub235:sys10240:print"";
  27. 145 gosub315:ifa<>0then280
  28. 150 gosub235
  29. 155 open15,u,15,"n0:temp,"+id$:close15
  30. 160 ln=0:gosub315:ifa<>0thenln=150:goto280
  31. 165 sys10243:print"";
  32. 170 gosub315:ifa<>0then280
  33. 175 forpx=0tozz-2
  34. 180 gosub235:sys10240:print"";
  35. 185 gosub315:ifa<>0then280
  36. 190 gosub235:sys10243:print"";
  37. 195 gosub315:ifa<>0then280
  38. 200 ifpeek(10255)=81then210
  39. 205 nextpx
  40. 210 open15,u,15,"i0":close15
  41. 215 print""d$d$d$:gosub325:printspc(13)"all done.":r$="run":goto285
  42. 220 poke52,160:poke56,160:clr:end
  43. 225 print""d$d$d$:gosub325:printspc(9)"sorry, bad connection"
  44. 230 printspc(8)"c128 with 1581 required.":goto285
  45. 235 if(ps>1)and((psand1)=0)thengosub320
  46. 240 ap$="writ":dp$="destination":ps=ps+1
  47. 245 if(psand1)=1thendp$="original":ap$="read"
  48. 250 ag$=" again,":ifps<3thenag$=","
  49. 255 printspc(7)"insert "dp$" disk"ag$
  50. 260 printspc(7)"press any key when ready."
  51. 265 geta$:ifa$=""then265
  52. 270 ifa$="r"thenclr:goto310
  53. 275 printspc(7)ap$"ing...":return
  54. 280 print""d$d$d$:gosub325:printspc(11)"sorry, disk error"
  55. 285 print:printspc(7)"press q to quit; or press"
  56. 290 printspc(7)"any other key to "r$" again,"
  57. 295 geta$:ifa$=""then295
  58. 300 ifa$="q"thenprint"[147]":goto220
  59. 305 ifln=150thengosub315:print"[145][145]":goto150
  60. 310 poke52,160:poke56,160:clr:run
  61. 315 open15,u,15:input#15,a,b$,c,d:close15
  62. 316 ifpeek(10269)<>0thena=78:b$="backup read error":return
  63. 317 ifpeek(10270)<>0thena=78:b$="backup write error":return
  64. 318 return
  65. 320 print""spc(19)ps/2+1"[145][145][145]"
  66. 325 printu$;:forx=1to8:printbl$"";:nextx:print"[145]"u$:return
  67. 330 poke10268,u:sys10252
  68. 335 ifpeek(10268)=0then345
  69. 340 nd=nd+1:du=u:ifnd=1thensu=u
  70. 345 return
  71. 350 open2,u,0,"$0:":forx=1to26:get#2,a$:next:get#2,a$,b$:id$=a$+b$:close2:return
  72.